import {WeaTools} from 'ecCom'

export const getQueryCondition = (params) => {
    const path = params.offical == "1" ? 'offical' : 'workflow';
    return WeaTools.callApi('/api/'+path+'/search/condition', 'GET', params);
}

export const getCustomQueryCondition = (params) => {
    return WeaTools.callApi('/api/workflow/customsearch/condition', 'POST', params);
}

export const getSearchResult = (params) => {
    const path = params.offical == "1" ? 'offical' : 'workflow';
    return WeaTools.callApi('/api/'+path+'/search/pagingresult', 'POST', params);
}

export const getTreeData = (params) => {
    const path = params.offical == "1" ? 'offical' : 'workflow';
    return WeaTools.callApi('/api/'+path+'/search/resulttree', 'POST', params);
}

export const getCustomWfInfo = (params) => {
    return WeaTools.callApi('/api/workflow/customsearch/wfinfo', 'POST', params);
}